{template Public:Page:header}


<div class="container">
    
<div class="row">
     
    <div class="row">
      <div class="col-lg-9">
        <div class="well" style="background:#FFF">
        
        
        <div class="row">
              <div class="col-lg-12 col-sm-12 col-xs-12">
                <div class="wizard wizard-wired">
                  <ul class="steps">
                   <li class="complete" data-target="#wiredstep2"><span class="step">1</span><span class="title">填写需求信息</span> <span class="chevron"></span></li>
                    <li class="complete" data-target="#wiredstep3"><span class="step">2</span><span class="title">设置赏金</span> <span class="chevron"></span></li>
                    <li class="active" data-target="#wiredstep4"><span class="step">3</span><span class="title">确认并托管</span> <span class="chevron"></span></li>
                  </ul>
                </div>
              </div>
        </div>
    
     <div class="row">
                
     <div class="col-lg-12"> 

<form data-bv-feedbackicons-validating="glyphicon glyphicon-refresh" data-bv-feedbackicons-invalid="glyphicon glyphicon-remove" data-bv-feedbackicons-valid="glyphicon glyphicon-ok" class="form-horizontal bv-form" id="TaskForm" novalidate="novalidate">
<input type="hidden" name="datatype" value="json"/>
<input type="hidden" name="Submit" value="true"/>
<input type="hidden" name="id" value="{echo $id}"/>
</form>
<table class="table">
                                    <thead>
                                        <tr>
                                            <th>
                                                项目
                                            </th>
                                            
                                            <th>
                                                描述
                                            </th>
                                            
                                            <th>
                                                金额
                                            </th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    	{if $manage['task_number']>1}
                                        <tr>
                                            <td>
                                                计件悬赏
                                            </td>
                                            
                                            <td>
                                                需要 <strong>{echo $manage['task_number']}</strong> 个稿件
                                            </td>
                                            
                                            <td>
                                                每件 <b class="color_f60" id="money">{echo $manage['money']/100}元</b>
                                            </td>
                                            
                                        </tr>
                                        {else}
                                        <tr>
                                            <td>
                                                单人悬赏
                                            </td>
                                            
                                            <td>
                                                只有一人中标
                                            </td>
                                            
                                            <td>
                                                <b class="color_f60" id="money">{echo $money}元</b>
                                            </td>
                                            
                                        </tr>
                                        {/if}
                                        
                                        {if $manage['top']}
                                        <tr>
                                            <td>
                                                推荐置顶
                                            </td>
                                            <td>
                                                您的任务在任务列表中置顶{echo C('tasktoptime')}天
                                            </td>
                                            <td>
                                                {echo C('tasktopfee')}元
                                            </td>
                                        </tr>
                                        {/if}
                                        {if $manage['robots']}
                                        <tr>
                                            <td>
                                               屏蔽搜索引擎
                                            </td>
                                            <td>
                                                您的任务不会被搜索引擎收录
                                            </td>
                                            <td>
                                                {echo C('taskrobotsfee')}元
                                            </td>
                                        </tr>
                                        {/if}
                                        {if $manage['hidetask']}
                                        <tr>
                                            <td>
                                                隐藏任务内容
                                            </td>
                                            <td>
                                                您的任务内容隐藏登录可见
                                            </td>
                                            <td>
                                                {echo C('hidetaskfee')}元
                                            </td>
                                        </tr>
                                        {/if}
                                       {if $manage['hidedraft']}
                                        <tr>
                                            <td>
                                                隐藏稿件内容 
                                            </td>
                                            <td>
                                                您的任务稿件内容隐藏您与投稿者可见
                                            </td>
                                            <td>
                                                {echo C('hidedraftfee')}元
                                            </td>
                                        </tr>
                                        {/if}
                                        
                                        {if $manage['promise']}
                                        <tr>
                                            <td>
                                                客服代选
                                            </td>
                                            <td>
                                                您的任务到期前任务客服会帮您选择优质稿件
                                            </td>
                                            <td>
                                                {echo C('taskpromisefee')}元
                                            </td>
                                        </tr>
                                        {/if}
                                        
                                        <tr>
                                            <td>
                                                总支付
                                            </td>
                                            <td>
                                            </td>
                                            
                                             <td>
                                                 <span class="color_f60" style="font-size:24px" id="Total">{echo $total}元</span>
                                            </td>
                                     
                                        </tr>
                                    </tbody>
                                </table>
                                
                                

    </div>
    
    </div>
                  
   
                    <div class="row">
                
                            <div class="col-lg-12"> <a class="btn btn-default shiny" href="{echo U('/task/publish/setmoney/id/'.$id)}">上一步</a> &nbsp;
                              <button class="btn btn-success" type="submit" id="SubmitConfirm">确认发布</button>
                            </div>
                             </div>
                
                   


        </div>
      </div>
      <div class="col-lg-3">
        <div class="well" style="background:#FFF">
  
          <h3 class="text-success">联系客服帮您发需求</h3>
          <h4>客服电话 400-000-000 </h4>
          <p class="label label-default">周一至周日9:00-23:00</p>
          <p>联系在线客服</p>
          <p class="label label-default">周一至周五9:00-18:00</p>
   
        </div>
      </div>
    </div>

</div>
</div>




<script src="{echo AURL}/js/validation/bootstrapValidator.js"></script>

<script>

		  $('#SubmitConfirm').click(function(){
			  
			  var total=parseInt($("#Total").html());
			  var message='是否任务发布?';
			  if(total){
				 message='任务发布需要支付'+total+'元,您是否同意支付?';
			  }
			   bootbox.confirm({  
				buttons: {  
					confirm: {  
						label: '同意',  
						className: 'btn-success'  
					},  
					cancel: {  
						label: '不同意',  
						className: 'btn-default'  
					}  
				},  
				message:  message,  
				callback: function(result) {  
					if(result) {  
						 bootbox.hideAll();
						 $.post('{echo U("/post/task/confirm/id/".$id)}',$("#TaskForm").serialize(), function(json) {
							
								$('.bootbox').PhpappProgress({json:json});
		
								return true;
							
						  }, 'json');
						  
						  
						  
						 bootbox.dialog({
							 message: '<div class="progress progress-striped active"><div style="width: 1%" aria-valuemax="100" aria-valuemin="0" aria-valuenow="20" role="progressbar" class="progress-bar progress-bar-info"><span>0%</span></div></div>',
							 title: '<i class="icon fa fa-retweet"></i> 提交中',
							 closeButton: false
						 }).PhpappProgress({time:1000});
					 
						  return false; 
						
					} 
				},  
				title: "确认支付托管",  
				});
		
			  
		
				  
		 });
 


    </script>
    
{template Public:Page:footer}